package com.sym.demo.duotai;


class Animal{


    public void eat(Animal d){

        System.out.println("动物吃");
    }

}

class Dog extends Animal{


    public void eat(Dog dog){
        System.out.println("ddddd");
    }

    @Override
    public void eat(Animal dog){

        System.out.println("狗吃");
    }
}

/**
 * @author suyongming
 * @date ：2021/3/17 23:10
 */
public class Demo {

    public static void main(String [] args){

        Animal a = new Dog();

        a.eat(a);
    }
}
